package org.zk.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class UtilDate {

    public static String getCurrentDateStrAll(){

        Date createDate = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String createDateStr = sdf.format(createDate);
        return createDateStr;

    }

    public static String getCurrentDateStr(){

        Date createDate = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm");
        String createDateStr = sdf.format(createDate);
        return createDateStr;

    }

    public static String getCurrentDateStrYMD(){

        Date createDate = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String createDateStr = sdf.format(createDate);
        return createDateStr;
    }
}
